<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>修改密码 - 我的管理中心</title>
{include file="head"}
<link href="/static/thinkct/css/basic.css?v=1" rel="stylesheet" type="text/css" /><script language="javascript" src="/static/thinkct/js/jquery.m.js"></script><script language="javascript" src="/static/thinkct/js/layui/layui.js"></script><script language="javascript" src="/static/thinkct/js/common.js?v=1"></script><script language="javascript" src="/static/thinkct/js/member.js?v=1"></script><link href="/static/thinkct/css/member.css?v=1" rel="stylesheet" type="text/css" /><link href="/static/thinkct/js/layui/css/layui.css" rel="stylesheet" type="text/css" /></head>
<body>
<!--头部-->
{include file="uhead"}

<!--头部-->
<div class="umain">
{include file="uleft"}  
<div class="uright">
 <div class="mwz">
 <li class='cur'><a>修改密码</a></li>
 </div>
<form class="layui-form layui-font14" action="" method="post" >
<div class="layui-form-item">
    <label class="layui-form-label">原密码</label>
    <div class="layui-input-inline">
	<input name="old" class="layui-input" value="" maxlength="30" autocomplete="off" lay-verify="pass" size="30" type="password" />
    </div>
	{if(isset($data.old))}
	<div class="layui-inline"> <div class="layui-form-mid layui-word-aux " style="color:red">原密码错误，请重新输入！</div></div>
	{/if}
</div>

<div class="layui-form-item">
    <label class="layui-form-label">新密码</label>
    <div class="layui-input-inline">
	<input name="new" class="layui-input pw-input" value="" maxlength="30" autocomplete="off" lay-verify="pass" size="30" type="password"/>
    </div>
	</div>
<div class="layui-form-item">
    <label class="layui-form-label">&nbsp;</label>
	    <div class="layui-input-inline">
		<div id="pw-strength">           	
			<div class="pw-bar"></div>
			<div class="pw-bar-on"></div>
			<div class="pw-txt">
			<span>弱</span>
			<span>中</span>
			<span>强</span>
			</div>
		</div>
</div>
</div>
<style type="text/css"> 
/*密码强度*/
#pw-strength{clear: both;float: left;position: relative;width: 180px;line-height:14px;}
.pw-bar{background: url(/static/thinkct/image/pwd-1.png) no-repeat;height: 14px;overflow: hidden;width: 179px;}
.pw-bar-on{background:  url(/static/thinkct/image/pwd-2.png) no-repeat; width:0px; height:14px;position: absolute;top: 0;left: 2px;transition: width .5s ease-in;-moz-transition: width .5s ease-in;-webkit-transition: width .5s ease-in;-o-transition: width .5s ease-in;}
.pw-weak .pw-defule{ width:0px;}
.pw-weak .pw-bar-on {width: 60px;}
.pw-medium .pw-bar-on {width: 120px;}
.pw-strong .pw-bar-on {width: 179px;}
.pw-txt {padding-top: 2px;width: 180px;overflow: hidden;}
.pw-txt span {color: #707070;float: left;font-size: 12px;text-align: center;width: 58px;}
</style>
<script type="text/javascript"> 
$(function(){ 
	$('.pw-input').keyup(function () { 
		var $div=$("#pw-strength");
		var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g"); 
		var mediumRegex = new RegExp("^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$", "g"); 
		var enoughRegex = new RegExp("(?=.{6,}).*", "g"); 
		    $div.removeAttr("class");
		if (false == enoughRegex.test($(this).val())) { 
			$div.addClass('pw-defule'); 
			 //密码小于六位的时候，密码强度图片都为灰色 
		} 
		else if (strongRegex.test($(this).val())) { 
			$div.addClass('pw-strong'); 
			 //密码为八位及以上并且字母数字特殊字符三项都包括,强度最强 
		} 
		else if (mediumRegex.test($(this).val())) { 
			$div.addClass('pw-medium'); 
			 //密码为七位及以上并且字母、数字、特殊字符三项中有两项，强度是中等 
		} 
		else { 
			$div.addClass('pw-weak'); 
			 //如果密码为6为及以下，就算字母、数字、特殊字符三项都包括，强度也是弱的 
		} 
		return true; 
	}); 
}) 
</script> 
<div class="layui-form-item">
    <label class="layui-form-label">再输一遍</label>
    <div class="layui-input-inline">
	<input name="renew" class="layui-input" value="" maxlength="30" lay-verify="pass" autocomplete="off" size="30" type="password" />
    </div>
	{if(isset($data.renew))}
	<div class="layui-inline"> <div class="layui-form-mid layui-word-aux " style="color:red">两次输入的密码不同！</div></div>
	{/if}
</div>

<div class="layui-form-item" style='padding-bottom:15px;'>
    <label class="layui-form-label"></label>
    <div class="layui-input-block"><input type="submit" class="layui-btn" lay-submit=""  value="确认提交" /></div>
</div>
  <input type="hidden" name="passkey" value="{:passkey()}">
</form>

 </div>
 </div>
{include file="bottom"}</body>
<script type="text/javascript">
layui.use('form', function(){
	var form = layui.form();
	form.on('submit', function(data) {
		progress(true);return true;
	});
});
</script>
</html>